#pragma once
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX_NAME 20
#define MAX_SEX 10
#define MAX_TELE 12
#define MAX_ADDR 30
#define MAX 100
 typedef struct PeoInfo
{
	char name[MAX_NAME];
	char sex[MAX_SEX];
	int age;
	char tele[MAX_TELE];
	char addr[MAX_ADDR];
}PeoInfo;

 typedef struct Contact
 {
	 PeoInfo data[MAX];
	 int sz;
 }Contact;

 enum Option
 {
	 EXIT,
	 ADD,
	 DEL,
	 SEARCH,
	 MODIFY,
	 SORT,
	 PRINT,
	 EMPTY
 };

 enum Sort
 {
	 NAME = 1,
	 AGE
 };

 enum Sequence
 {
	 RISE=1,
	 FALL
 };

 void menu();

 void menusort();

 void menusubsequence();

 void InitContact(Contact* Con);

 void ContactAdd(Contact* Con);

 void ContactDel(Contact* Con);

 void ContactSearch(Contact* Con);

 void ContactModify(Contact* Con);

 void ContactSort(Contact* Con);

 void ContactPrint(Contact* Con);